package com.asd.map.mapper;

import com.asd.map.entity.Map_apply;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component
public interface MapApplyMappper extends BaseMapper<Map_apply> {

    //void addApply(String id,String mapName,String mapLable,String mapDesc,String mapLink,String creation_time);

    void delApply(String id);

    List<Map_apply> queryPageList(Page<Map_apply> pagination);

    void updateById1(Map_apply apply);


//    @Update("UPDATE map_apply SET data=#{data} WHERE id=#{applyId}")

//    @Update("update map_apply set data=CONCAT(data,#{data} ) WHERE id=#{applyId}")

    @Update("update map_apply set data=#{data} WHERE id=#{applyId}")
    void updateById1(@Param("data") String data, @Param("applyId") String applyId);

    @Update("update map_apply set view=#{view} WHERE id=#{id}")
    void updetViewById(@Param("id")String id,@Param("view") String view);

    @Update("update map_apply set baseLayer=#{baseLayer} WHERE id=#{id}")
    void changeBaseLayer(@Param("id")String id,@Param("baseLayer") String vibaseLayerew );
}
